package util

import (
	"cke.io/ckectl/app/apis/v1alpha1"
)

type CkeNodeSort []v1alpha1.CkeNode

func (cn CkeNodeSort) Len() int {
	return len(cn)
}

func (cn CkeNodeSort) Swap(i, j int) {
	cn[i], cn[j] = cn[j], cn[i]
}

func (cn CkeNodeSort) Less(i, j int) bool {
	return cn[i].ObjectMeta.Name < cn[j].ObjectMeta.Name
}
